Optimal. Leaf size=55 \[ -\frac {\tanh ^{-1}(\cosh (c+d x))}{a d}+\frac {\sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \text {sech}(c+d x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b} d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3745, 400, 213,
214} \begin {gather*} \frac {\sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \text {sech}(c+d x)}{\sqrt {a+b}}\right )}{a d \sqrt {a+b}}-\frac {\tanh ^{-1}(\cosh (c+d x))}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 214
Rule 400
Rule 3745
Rubi steps
\begin {align*} \int \frac {\text {csch}(c+d x)}{a+b \tanh ^2(c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \left (a+b-b x^2\right )} \, dx,x,\text {sech}(c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\text {sech}(c+d x)\right )}{a d}+\frac {b \text {Subst}\left (\int \frac {1}{a+b-b x^2} \, dx,x,\text {sech}(c+d x)\right )}{a d}\\ &=-\frac {\tanh ^{-1}(\cosh (c+d x))}{a d}+\frac {\sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \text {sech}(c+d x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.16, size = 123, normalized size = 2.24 \begin {gather*} \frac {i \sqrt {b} \text {ArcTan}\left (\frac {-i \sqrt {a+b}-\sqrt {a} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b}}\right )+i \sqrt {b} \text {ArcTan}\left (\frac {-i \sqrt {a+b}+\sqrt {a} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b}}\right )+\sqrt {a+b} \log \left (\tanh \left (\frac {1}{2} (c+d x)\right )\right )}{a \sqrt {a+b} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 2.40, size = 67, normalized size = 1.22
method | result | size |
derivativedivides | \(\frac {\frac {b \arctanh \left (\frac {2 a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 a +4 b}{4 \sqrt {a b +b^{2}}}\right )}{a \sqrt {a b +b^{2}}}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}}{d}\) | \(67\) |
default | \(\frac {\frac {b \arctanh \left (\frac {2 a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 a +4 b}{4 \sqrt {a b +b^{2}}}\right )}{a \sqrt {a b +b^{2}}}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}}{d}\) | \(67\) |
risch | \(\frac {\ln \left ({\mathrm e}^{d x +c}-1\right )}{d a}-\frac {\ln \left ({\mathrm e}^{d x +c}+1\right )}{d a}+\frac {\sqrt {b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {b \left (a +b \right )}\, {\mathrm e}^{d x +c}}{a +b}+1\right )}{2 \left (a +b \right ) d a}-\frac {\sqrt {b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {b \left (a +b \right )}\, {\mathrm e}^{d x +c}}{a +b}+1\right )}{2 \left (a +b \right ) d a}\) | \(139\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 197 vs.
\(2 (47) = 94\).
time = 0.40, size = 587, normalized size = 10.67 \begin {gather*} \left [\frac {\sqrt {\frac {b}{a + b}} \log \left (\frac {{\left (a + b\right )} \cosh \left (d x + c\right )^{4} + 4 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a + b\right )} \sinh \left (d x + c\right )^{4} + 2 \, {\left (a + 3 \, b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + a + 3 \, b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{3} + {\left (a + 3 \, b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + 4 \, {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{3} + 3 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + {\left (a + b\right )} \sinh \left (d x + c\right )^{3} + {\left (a + b\right )} \cosh \left (d x + c\right ) + {\left (3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + a + b\right )} \sinh \left (d x + c\right )\right )} \sqrt {\frac {b}{a + b}} + a + b}{{\left (a + b\right )} \cosh \left (d x + c\right )^{4} + 4 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a + b\right )} \sinh \left (d x + c\right )^{4} + 2 \, {\left (a - b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + a - b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{3} + {\left (a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a + b}\right ) - 2 \, \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) + 1\right ) + 2 \, \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) - 1\right )}{2 \, a d}, \frac {\sqrt {-\frac {b}{a + b}} \arctan \left (\frac {{\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{3} + 3 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + {\left (a + b\right )} \sinh \left (d x + c\right )^{3} + {\left (a - 3 \, b\right )} \cosh \left (d x + c\right ) + {\left (3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + a - 3 \, b\right )} \sinh \left (d x + c\right )\right )} \sqrt {-\frac {b}{a + b}}}{2 \, b}\right ) - \sqrt {-\frac {b}{a + b}} \arctan \left (\frac {{\left ({\left (a + b\right )} \cosh \left (d x + c\right ) + {\left (a + b\right )} \sinh \left (d x + c\right )\right )} \sqrt {-\frac {b}{a + b}}}{2 \, b}\right ) - \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) + 1\right ) + \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) - 1\right )}{a d}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {csch}{\left (c + d x \right )}}{a + b \tanh ^{2}{\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.92, size = 284, normalized size = 5.16 \begin {gather*} -\frac {2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\left (9\,b^4\,\sqrt {-a^2\,d^2}+16\,a^2\,b^2\,\sqrt {-a^2\,d^2}+24\,a\,b^3\,\sqrt {-a^2\,d^2}\right )}{16\,d\,a^3\,b^2+24\,d\,a^2\,b^3+9\,d\,a\,b^4}\right )}{\sqrt {-a^2\,d^2}}-\frac {\sqrt {b}\,\left (2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\sqrt {-a^3\,d^2-b\,a^2\,d^2}\,\sqrt {-a^2\,d^2\,\left (a+b\right )}+{\mathrm {e}}^{3\,c}\,{\mathrm {e}}^{3\,d\,x}\,\sqrt {-a^3\,d^2-b\,a^2\,d^2}\,\sqrt {-a^2\,d^2\,\left (a+b\right )}+4\,a^2\,b\,d^2\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c}{2\,a\,\sqrt {b}\,d\,\sqrt {-a^2\,d^2\,\left (a+b\right )}}\right )-2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\sqrt {-a^2\,d^2\,\left (a+b\right )}}{2\,a\,\sqrt {b}\,d}\right )\right )}{2\,\sqrt {-a^3\,d^2-b\,a^2\,d^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________